package org.wyn.mongodb.dao.impl;

import org.bson.types.ObjectId;
import org.wyn.mongodb.bean.Blog;
import org.wyn.mongodb.common.SearchBDProvider;

import com.google.code.morphia.dao.BasicDAO;
import com.google.code.morphia.query.Query;
/**
 * 日志mongodb dao层(实现)
 * @author wyn
 *
 */
public class BlogDao extends BasicDAO<Blog, ObjectId>{
	public BlogDao(){
		super(SearchBDProvider.getInstance());
	}
	
	public void t() {
		Query<Blog> query = createQuery();
		
		query.or(
				query.criteria("").equal(""),
				query.criteria("").equal(""),
				query.criteria("").equal("")
				);
		
	}
	public static void main(String[] args) {
		Blog b = Blog.createTestBlog();
		BlogDao bd = new BlogDao();
		bd.save(b);
	}
}
